﻿@{
    Layout = null;
}
@using MvcMall.AdminPortal.Controllers.AdminUser.ViewModels;
@model EditUserRoleModel
<!DOCTYPE html>
<html>
<head>
    <title>修改用户角色</title>
    <link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#tabs").tabs({
                ajaxOptions: {
                    error: function (xhr, status, index, anchor) {
                        $(anchor.hash).html("系统繁忙,请稍候再试");
                    }
                }
            });
        });
    </script>
</head>
<body>
    <div id="tabs">
        <ul>
            <li><a href="#edit">修改用户角色</a></li></ul>
        <div id="edit">
            @using (Html.BeginForm("EditUserRole"))
            {
                <table width=100%>
                    <tr>
                        <th colspan="4">
                            管理员角色关系
                        </th>
                    </tr>
                    <tr>
                        <td style="width: 20%; text-align: right">
                            管理员用户名:
                        </td>
                        <td style=width:30%>
                            @Html.HiddenFor(m => m.UserId)
                            @Html.TextBoxFor(m => m.UserName)
                        </td>
                        <td style="width: 20%; text-align: right">
                            对应角色
                        </td>
                        <td style=width:30%>
                            @Html.DropDownListFor(m => m.RoleId, ViewData["RoleList"] as IEnumerable<SelectListItem>)
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4" style=" text-align:center;">
                            <input type="submit" value="保存关系" />
                        </td>
                    </tr>
                </table>
            }
        </div>
    </div>
</body>
</html>
